package com.example.demo.arithmetic.datastructure.linkedlist2;

public class RingLinkedListApp {
    public static void main(String[] args) {
        RingLinkedList linkedList = new RingLinkedList();
        linkedList.addFirst(5);
        linkedList.addFirst(4);
        linkedList.addFirst(3);
        linkedList.addFirst(2);
        linkedList.addFirst(1);
        linkedList.addLast(6);
//        linkedList.removeFirst();

//        linkedList.removeFirst();
//        linkedList.removeFirst();
//        linkedList.removeFirst();
//        linkedList.removeFirst();
//        linkedList.removeFirst();

//        linkedList.removeFirst();
        linkedList.removeByValue(6);
        for (Integer d : linkedList) {
            System.out.println(d);

        }
    }
}
